<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增个人履历')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-detail-add">
            <input id="userId" name="userId" type="hidden" th:value="${userId}">
            <div class="form-group">
                <label class="col-sm-3 control-label">姓名：</label>
                <div class="col-sm-8">
                    <input name="userName" class="form-control" type="text" th:value="${userName}" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">时间范围：</label>
                <div class="col-sm-8">
                    <div class="layui-input-inline">
                        <input type="text" class="form-control" id="test" name="startTime" placeholder=" 请选择" required>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">履历介绍：</label>
                <div class="col-sm-8">
                    <textarea name="introduce" class="form-control" type="text"></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "system/detail"

        layui.use('laydate', function() {
            var laydate = layui.laydate;
            //年范围
            laydate.render({
                elem: '#test'
                ,type: 'year'
                ,range: true
            });
        });


        $("#form-detail-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-detail-add').serialize());
            }
        }
    </script>
</body>
</html>